#include <stdio.h>
void larger_of(double * x, double * y);

int main(void)
{
    double a, b;

    printf("输入两个浮点数 (q to quit): ");
    while (scanf("%lf %lf", &a, &b) == 2)
    {
        larger_of(&a, &b);
        printf("a: %.2lf b: %.2lf\n", a, b);
        printf("可以再输入两个浮点数（q to quit): ");
    }
    printf("Bye!");

    return 0;
}

void larger_of(double * x, double * y)
{
    if (*x > *y)
        *y = *x;
    else
        *x = *y;
}